## Script (Python) "searchList"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters= object,type='ComixChapter',maxSize=0
##title=
##
from Products.CMFCore.utils import getToolByName
if object==None:
    object = context
results =[]
catalog = getToolByName(object,'portal_catalog')
path='/'.join(object.getPhysicalPath())

# sort_on='sortable_title', sort_order='ascending'

list = catalog.searchResults(path=path,portal_type = type,sort_on='created',sort_order='descending')
for item in list:
    results.append(item.getObject())
if maxSize==0:
    return results
else:
    return results[:maxSize]